﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ReservoirDAL;
using ReservoirModel;

namespace ReservoirBLL
{
    public class LoginBLL
    {
        LoginDAL LoginDAL = new LoginDAL();
        /// <summary>
        /// 实现登录
        /// </summary>
        /// <param name="UserName"></param>
        /// <param name="PassWord"></param>
        /// <returns></returns>
        public TBUser Login(string UserName, string PassWord)
        {
            var login = LoginDAL.Login(UserName, PassWord);
            TBUser tBUser = new TBUser();
            var ID = LoginDAL.GetInfo(tBUser.Id);
            if (login == null)
            {

            }
            else
            {
                return login;
            }
            return ID;
        }

        //public int Login(string Name, string Pwd)
        //{
        //    int result = LoginDAL.Login(Name, Pwd);
        //    return result;
        //}
    }
}
